using Easislides.Properties;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Easislides
{
	public class FrmSingleMonitorAlert : Form
	{
		private IContainer components = null;
		private Button MessageShow;
		private Button BtnDismiss;
		private Button BtnCancel;
		private Panel panelMessageBtn;
		private ToolStrip ToolBarMessageFormat;
		private ToolStripButton Message_Scroll;
		private ToolStripButton Message_Flash;
		private ToolStripButton Message_Transparent;
		private Panel panelParentalBtn;
		private ToolStrip ToolBarParentalFormat;
		private ToolStripButton Parental_Scroll;
		private ToolStripButton Parental_Flash;
		private ToolStripButton Parental_Transparent;
		private Button ParentalShow;
		private TextBox ParentalPrefix;
		private ComboBox cbMessageAlert;
		private ComboBox cbParentalAlert;
		private Button btnClearHistoryMessage;
		private Button btnClearHistoryParental;
		public FrmSingleMonitorAlert()
		{
			this.InitializeComponent();
		}
		private void FrmSingleMonitorAlert_Load(object sender, EventArgs e)
		{
			base.Height = 24;
			base.Top = Screen.PrimaryScreen.Bounds.Height - base.Height;
			base.Left = 0;
			this.LoadAlertList();
			this.Message_Scroll.Checked = gf.MessageAlertScroll;
			this.Message_Flash.Checked = gf.MessageAlertFlash;
			this.Message_Transparent.Checked = gf.MessageAlertTransparent;
			this.cbMessageAlert.Text = gf.MessageAlertDetails;
			this.cbMessageAlert.SelectAll();
			this.Parental_Scroll.Checked = gf.ParentalAlertScroll;
			this.Parental_Flash.Checked = gf.ParentalAlertFlash;
			this.Parental_Transparent.Checked = gf.ParentalAlertTransparent;
			this.cbParentalAlert.Text = gf.ParentalAlertDetails;
			this.ParentalPrefix.Text = gf.ParentalAlertHeading + " ";
			Cursor.Position = new Point(270, base.Top + 12);
			Cursor.Show();
		}
		private void LoadAlertList()
		{
			gf.LoadComboBoxFromTextFile(ref this.cbMessageAlert, gf.AlertsDataFile);
			gf.LoadComboBoxFromTextFile(ref this.cbParentalAlert, gf.ParentalDataFile);
		}
		private void MessageShow_Click(object sender, EventArgs e)
		{
			gf.MessageAlertDetails = gf.Trim(this.cbMessageAlert.Text);
			if (!(gf.MessageAlertDetails == ""))
			{
				this.cbMessageAlert.Text = gf.Trim(this.cbMessageAlert.Text);
				if (this.cbMessageAlert.Items.Count == 0 || this.cbMessageAlert.Text != this.cbMessageAlert.Items[0].ToString())
				{
					try
					{
						this.cbMessageAlert.Items.Insert(0, this.cbMessageAlert.Text);
						if (this.cbMessageAlert.Items.Count > 20)
						{
							for (int i = this.cbMessageAlert.Items.Count; i >= 21; i--)
							{
								this.cbMessageAlert.Items.RemoveAt(i);
							}
						}
						gf.SaveComboBoxToTextFile(ref this.cbMessageAlert, gf.AlertsDataFile);
					}
					catch
					{
					}
				}
				gf.MessageAlertScroll = this.Message_Scroll.Checked;
				gf.MessageAlertFlash = this.Message_Flash.Checked;
				gf.MessageAlertTransparent = this.Message_Transparent.Checked;
				gf.MessageAlertDetails = this.cbMessageAlert.Text;
				base.DialogResult = DialogResult.OK;
				gf.AlertSettings(gf.AlertType.Message);
				base.Close();
			}
		}
		private void ParentalShow_Click(object sender, EventArgs e)
		{
			gf.ParentalAlertDetails = gf.Trim(this.cbParentalAlert.Text);
			if (!(gf.ParentalAlertDetails == ""))
			{
				if (this.cbParentalAlert.Items.Count == 0 || this.cbParentalAlert.Text != this.cbParentalAlert.Items[0].ToString())
				{
					try
					{
						this.cbParentalAlert.Items.Insert(0, this.cbParentalAlert.Text);
						if (this.cbParentalAlert.Items.Count > 20)
						{
							for (int i = this.cbParentalAlert.Items.Count; i >= 21; i--)
							{
								this.cbParentalAlert.Items.RemoveAt(i);
							}
						}
						gf.SaveComboBoxToTextFile(ref this.cbParentalAlert, gf.ParentalDataFile);
					}
					catch
					{
					}
				}
				gf.ParentalAlertScroll = this.Parental_Scroll.Checked;
				gf.ParentalAlertFlash = this.Parental_Flash.Checked;
				gf.ParentalAlertTransparent = this.Parental_Transparent.Checked;
				gf.ParentalAlertDetails = this.cbParentalAlert.Text;
				base.DialogResult = DialogResult.OK;
				gf.AlertSettings(gf.AlertType.Parental);
				base.Close();
			}
		}
		private void BtnDismiss_Click(object sender, EventArgs e)
		{
			gf.ParentalAlertLive = false;
			gf.MessageAlertLive = false;
			base.Close();
		}
		private void BtnCancel_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void FrmSingleMonitorAlert_FormClosing(object sender, FormClosingEventArgs e)
		{
			gf.SaveOptionsData();
			Cursor.Hide();
		}
		private void btnClearHistoryMessage_Click(object sender, EventArgs e)
		{
			this.cbMessageAlert.Items.Clear();
			this.cbMessageAlert.Text = "";
			gf.MessageAlertDetails = "";
			gf.SaveComboBoxToTextFile(ref this.cbMessageAlert, gf.AlertsDataFile);
		}
		private void btnClearHistoryParental_Click(object sender, EventArgs e)
		{
			this.cbParentalAlert.Items.Clear();
			this.cbParentalAlert.Text = "";
			gf.ParentalAlertDetails = "";
			gf.SaveComboBoxToTextFile(ref this.cbParentalAlert, gf.ParentalDataFile);
		}
		private void cbMessageAlert_Enter(object sender, EventArgs e)
		{
			base.AcceptButton = this.MessageShow;
		}
		private void cbParentalAlert_Enter(object sender, EventArgs e)
		{
			base.AcceptButton = this.ParentalShow;
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
            this.MessageShow = new System.Windows.Forms.Button();
            this.BtnDismiss = new System.Windows.Forms.Button();
            this.BtnCancel = new System.Windows.Forms.Button();
            this.panelMessageBtn = new System.Windows.Forms.Panel();
            this.ToolBarMessageFormat = new System.Windows.Forms.ToolStrip();
            this.Message_Scroll = new System.Windows.Forms.ToolStripButton();
            this.Message_Flash = new System.Windows.Forms.ToolStripButton();
            this.Message_Transparent = new System.Windows.Forms.ToolStripButton();
            this.panelParentalBtn = new System.Windows.Forms.Panel();
            this.ToolBarParentalFormat = new System.Windows.Forms.ToolStrip();
            this.Parental_Scroll = new System.Windows.Forms.ToolStripButton();
            this.Parental_Flash = new System.Windows.Forms.ToolStripButton();
            this.Parental_Transparent = new System.Windows.Forms.ToolStripButton();
            this.ParentalShow = new System.Windows.Forms.Button();
            this.ParentalPrefix = new System.Windows.Forms.TextBox();
            this.cbMessageAlert = new System.Windows.Forms.ComboBox();
            this.cbParentalAlert = new System.Windows.Forms.ComboBox();
            this.btnClearHistoryParental = new System.Windows.Forms.Button();
            this.btnClearHistoryMessage = new System.Windows.Forms.Button();
            this.panelMessageBtn.SuspendLayout();
            this.ToolBarMessageFormat.SuspendLayout();
            this.panelParentalBtn.SuspendLayout();
            this.ToolBarParentalFormat.SuspendLayout();
            this.SuspendLayout();
            // 
            // MessageShow
            // 
            this.MessageShow.Location = new System.Drawing.Point(0, 0);
            this.MessageShow.Name = "MessageShow";
            this.MessageShow.Size = new System.Drawing.Size(44, 22);
            this.MessageShow.TabIndex = 1;
            this.MessageShow.Text = "Show";
            this.MessageShow.Click += new System.EventHandler(this.MessageShow_Click);
            // 
            // BtnDismiss
            // 
            this.BtnDismiss.Location = new System.Drawing.Point(320, 2);
            this.BtnDismiss.Name = "BtnDismiss";
            this.BtnDismiss.Size = new System.Drawing.Size(37, 22);
            this.BtnDismiss.TabIndex = 2;
            this.BtnDismiss.Text = "Stop";
            this.BtnDismiss.Click += new System.EventHandler(this.BtnDismiss_Click);
            // 
            // BtnCancel
            // 
            this.BtnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.BtnCancel.Location = new System.Drawing.Point(358, 2);
            this.BtnCancel.Name = "BtnCancel";
            this.BtnCancel.Size = new System.Drawing.Size(37, 22);
            this.BtnCancel.TabIndex = 3;
            this.BtnCancel.Text = "Exit";
            this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
            // 
            // panelMessageBtn
            // 
            this.panelMessageBtn.Controls.Add(this.ToolBarMessageFormat);
            this.panelMessageBtn.Location = new System.Drawing.Point(191, 3);
            this.panelMessageBtn.Name = "panelMessageBtn";
            this.panelMessageBtn.Size = new System.Drawing.Size(71, 20);
            this.panelMessageBtn.TabIndex = 22;
            // 
            // ToolBarMessageFormat
            // 
            this.ToolBarMessageFormat.AutoSize = false;
            this.ToolBarMessageFormat.CanOverflow = false;
            this.ToolBarMessageFormat.Dock = System.Windows.Forms.DockStyle.None;
            this.ToolBarMessageFormat.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
            this.ToolBarMessageFormat.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.Message_Scroll,
            this.Message_Flash,
            this.Message_Transparent});
            this.ToolBarMessageFormat.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
            this.ToolBarMessageFormat.Location = new System.Drawing.Point(0, 0);
            this.ToolBarMessageFormat.Name = "ToolBarMessageFormat";
            this.ToolBarMessageFormat.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
            this.ToolBarMessageFormat.Size = new System.Drawing.Size(71, 22);
            this.ToolBarMessageFormat.TabIndex = 0;
            // 
            // Message_Scroll
            // 
            this.Message_Scroll.CheckOnClick = true;
            this.Message_Scroll.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.Message_Scroll.Image = global::Properties.Resources.scroll;
            this.Message_Scroll.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.Message_Scroll.Name = "Message_Scroll";
            this.Message_Scroll.Size = new System.Drawing.Size(23, 19);
            this.Message_Scroll.ToolTipText = "Scroll";
            // 
            // Message_Flash
            // 
            this.Message_Flash.CheckOnClick = true;
            this.Message_Flash.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.Message_Flash.Image = global::Properties.Resources.flash;
            this.Message_Flash.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.Message_Flash.Name = "Message_Flash";
            this.Message_Flash.Size = new System.Drawing.Size(23, 19);
            this.Message_Flash.ToolTipText = "Flash";
            // 
            // Message_Transparent
            // 
            this.Message_Transparent.CheckOnClick = true;
            this.Message_Transparent.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.Message_Transparent.Image = global::Properties.Resources.transparent;
            this.Message_Transparent.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.Message_Transparent.Name = "Message_Transparent";
            this.Message_Transparent.Size = new System.Drawing.Size(23, 19);
            this.Message_Transparent.Text = "Transparent";
            // 
            // panelParentalBtn
            // 
            this.panelParentalBtn.Controls.Add(this.ToolBarParentalFormat);
            this.panelParentalBtn.Location = new System.Drawing.Point(629, 3);
            this.panelParentalBtn.Name = "panelParentalBtn";
            this.panelParentalBtn.Size = new System.Drawing.Size(71, 20);
            this.panelParentalBtn.TabIndex = 25;
            // 
            // ToolBarParentalFormat
            // 
            this.ToolBarParentalFormat.AutoSize = false;
            this.ToolBarParentalFormat.CanOverflow = false;
            this.ToolBarParentalFormat.Dock = System.Windows.Forms.DockStyle.None;
            this.ToolBarParentalFormat.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
            this.ToolBarParentalFormat.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.Parental_Scroll,
            this.Parental_Flash,
            this.Parental_Transparent});
            this.ToolBarParentalFormat.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
            this.ToolBarParentalFormat.Location = new System.Drawing.Point(0, 0);
            this.ToolBarParentalFormat.Name = "ToolBarParentalFormat";
            this.ToolBarParentalFormat.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
            this.ToolBarParentalFormat.Size = new System.Drawing.Size(71, 22);
            this.ToolBarParentalFormat.TabIndex = 0;
            // 
            // Parental_Scroll
            // 
            this.Parental_Scroll.CheckOnClick = true;
            this.Parental_Scroll.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.Parental_Scroll.Image = global::Properties.Resources.scroll;
            this.Parental_Scroll.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.Parental_Scroll.Name = "Parental_Scroll";
            this.Parental_Scroll.Size = new System.Drawing.Size(23, 19);
            this.Parental_Scroll.ToolTipText = "Scroll";
            // 
            // Parental_Flash
            // 
            this.Parental_Flash.CheckOnClick = true;
            this.Parental_Flash.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.Parental_Flash.Image = global::Properties.Resources.flash;
            this.Parental_Flash.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.Parental_Flash.Name = "Parental_Flash";
            this.Parental_Flash.Size = new System.Drawing.Size(23, 19);
            this.Parental_Flash.ToolTipText = "Flash";
            // 
            // Parental_Transparent
            // 
            this.Parental_Transparent.CheckOnClick = true;
            this.Parental_Transparent.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.Parental_Transparent.Image = global::Properties.Resources.transparent;
            this.Parental_Transparent.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.Parental_Transparent.Name = "Parental_Transparent";
            this.Parental_Transparent.Size = new System.Drawing.Size(23, 19);
            this.Parental_Transparent.ToolTipText = "Transparent";
            // 
            // ParentalShow
            // 
            this.ParentalShow.Location = new System.Drawing.Point(702, 2);
            this.ParentalShow.Name = "ParentalShow";
            this.ParentalShow.Size = new System.Drawing.Size(44, 22);
            this.ParentalShow.TabIndex = 24;
            this.ParentalShow.Text = "Show";
            this.ParentalShow.Click += new System.EventHandler(this.ParentalShow_Click);
            // 
            // ParentalPrefix
            // 
            this.ParentalPrefix.Location = new System.Drawing.Point(409, 3);
            this.ParentalPrefix.Name = "ParentalPrefix";
            this.ParentalPrefix.ReadOnly = true;
            this.ParentalPrefix.Size = new System.Drawing.Size(114, 20);
            this.ParentalPrefix.TabIndex = 26;
            this.ParentalPrefix.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // cbMessageAlert
            // 
            this.cbMessageAlert.FormattingEnabled = true;
            this.cbMessageAlert.Location = new System.Drawing.Point(3, 2);
            this.cbMessageAlert.MaxDropDownItems = 4;
            this.cbMessageAlert.Name = "cbMessageAlert";
            this.cbMessageAlert.Size = new System.Drawing.Size(164, 21);
            this.cbMessageAlert.TabIndex = 27;
            this.cbMessageAlert.Enter += new System.EventHandler(this.cbMessageAlert_Enter);
            // 
            // cbParentalAlert
            // 
            this.cbParentalAlert.FormattingEnabled = true;
            this.cbParentalAlert.Location = new System.Drawing.Point(524, 2);
            this.cbParentalAlert.MaxDropDownItems = 4;
            this.cbParentalAlert.Name = "cbParentalAlert";
            this.cbParentalAlert.Size = new System.Drawing.Size(80, 21);
            this.cbParentalAlert.TabIndex = 28;
            this.cbParentalAlert.Enter += new System.EventHandler(this.cbParentalAlert_Enter);
            // 
            // btnClearHistoryParental
            // 
            this.btnClearHistoryParental.FlatAppearance.BorderSize = 0;
            this.btnClearHistoryParental.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnClearHistoryParental.Image = global::Properties.Resources.deleteW;
            this.btnClearHistoryParental.Location = new System.Drawing.Point(604, 1);
            this.btnClearHistoryParental.Name = "btnClearHistoryParental";
            this.btnClearHistoryParental.Size = new System.Drawing.Size(23, 22);
            this.btnClearHistoryParental.TabIndex = 30;
            this.btnClearHistoryParental.Click += new System.EventHandler(this.btnClearHistoryParental_Click);
            // 
            // btnClearHistoryMessage
            // 
            this.btnClearHistoryMessage.FlatAppearance.BorderSize = 0;
            this.btnClearHistoryMessage.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnClearHistoryMessage.Image = global::Properties.Resources.deleteW;
            this.btnClearHistoryMessage.Location = new System.Drawing.Point(167, 2);
            this.btnClearHistoryMessage.Name = "btnClearHistoryMessage";
            this.btnClearHistoryMessage.Size = new System.Drawing.Size(23, 22);
            this.btnClearHistoryMessage.TabIndex = 29;
            this.btnClearHistoryMessage.Click += new System.EventHandler(this.btnClearHistoryMessage_Click);
            // 
            // FrmSingleMonitorAlert
            // 
            this.AcceptButton = this.MessageShow;
            this.CancelButton = this.BtnCancel;
            this.ClientSize = new System.Drawing.Size(750, 29);
            this.Controls.Add(this.cbParentalAlert);
            this.Controls.Add(this.cbMessageAlert);
            this.Controls.Add(this.ParentalPrefix);
            this.Controls.Add(this.panelParentalBtn);
            this.Controls.Add(this.ParentalShow);
            this.Controls.Add(this.panelMessageBtn);
            this.Controls.Add(this.BtnCancel);
            this.Controls.Add(this.BtnDismiss);
            this.Controls.Add(this.MessageShow);
            this.Controls.Add(this.btnClearHistoryMessage);
            this.Controls.Add(this.btnClearHistoryParental);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Name = "FrmSingleMonitorAlert";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.TopMost = true;
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmSingleMonitorAlert_FormClosing);
            this.Load += new System.EventHandler(this.FrmSingleMonitorAlert_Load);
            this.panelMessageBtn.ResumeLayout(false);
            this.ToolBarMessageFormat.ResumeLayout(false);
            this.ToolBarMessageFormat.PerformLayout();
            this.panelParentalBtn.ResumeLayout(false);
            this.ToolBarParentalFormat.ResumeLayout(false);
            this.ToolBarParentalFormat.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

		}
	}
}
